/*
 * @Description: 产量录入
 */
import zhreq from "@/api/axios";
export default {
  /**
   * @description: 获取种养品种 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   */
  getlist(params) {
    return zhreq.post("/v3/harvest/yield/queryPageByCondition", {
      ...params
    });
  },
  /**
   * @description: 添加
   * @param {Object}  *
   */
  addlist(params) {
    return zhreq.post('/v3/harvest/yield/add', params);
  },
  /**
   * @description: 批量删除
   * @param {Object}  *
   */
  dellist(params) {
    return zhreq.post('/v3/harvest/yield/delListByNo', {
      'noList': params
    });
  },
  /**
   * @description: 修改
   * @param {Object}  *
   */
  editlist(params) {
    return zhreq.post('/v3/harvest/yield/edit', params);
  },
  /**
   * @description: 条件查询
   * @param {Object}  *
   */
  querybycondition(params) {
    return zhreq.post('/v3/harvest/yield/queryByCondition', {
      ...params
    });
  },
  /**
   * @description: 查询产量规格
   * @param {Object}  *
   */
  getspecification(params) {
    if (params) {
      return zhreq.post('/v3/harvest/standard/queryByCondition', {
        plantVarietyNo: params
      });
    } else {
      return zhreq.post('/v3/harvest/standard/queryByCondition', {
        organizationNo: sessionStorage.organizationNo,
        farmingTypeNo: sessionStorage.farmingTypeNo
      });
    }
  },
    // 获取编号
    getNOList(no) {
      return zhreq.get(`v3/batch/productionBatch/queryByNo?no=${no}&isEliminate=false`)
    }
};
